<template>
    <div>
        <a-button type="primary" @click="remove" danger>remove</a-button>
    </div>
</template>

<script setup lang="ts">
import { Button as AButton } from 'ant-design-vue';
console.log("RightMenu");
const { node,graph } = defineProps(["node","graph"])

function remove() {
    graph.removeCell(node)
    destroySelf()
}
// 假设你有一个函数来决定是否销毁组件
function destroySelf() {
    window._destroy()
}
</script>

<style scoped></style>